<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>质量知识基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
    <style>
        .listBody .layui-form .qbdms-formTitle{
            font-size: 30px;color:#303133;font-weight: 400;height: unset;line-height: 42px
        }
        .listBody button.qbdms-returnOn{
            margin-top: 28px;padding: 0 16px;background-color: #2682FF;color: #fff
        }
         .main-fun .leftCon .classification{
            height: 24px;
            width: 80px;
            display: inline-block;
            line-height: 24px;
            margin-right: 16px;
            background-color: #F7F7F7;
            color:#7C7D80 ;
            border-radius:2px ;
            border: 1px solid #EEF0FA;
            text-align:center ;
        }
         .main-fun .leftCon .nameInfo{
            color: #606266;
            font-weight: 400;
        }
        .main-fun .leftCon .timeInfo{
            color: #C0C4CC;
            display: inline-block;
            margin-left: 8px;
        }
        .bigTit{
            height: 16px;line-height: 16px;
            color:#303133 ;
            font-size: 16px;
            font-weight: bold;
            margin: 24px 0 10px 0;
            padding-left: 8px;
            border-left: 4px solid #2682FF;
        }
        .qbdms-bodyDiv .layui-form{
            position: absolute;top: 90px;bottom: 18px;overflow: auto;left: 130px;right: 36px;padding-right: 76px
        }
        /*滚动条样式*/
        .qbdms-bodyDiv .layui-form::-webkit-scrollbar {
            width: 4px;
            /*height: 4px;*/
        }
        .qbdms-bodyDiv .layui-form::-webkit-scrollbar-thumb {
            border-radius: 10px;
            /*-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);*/
            background: #c1c5cd;
        }
        .qbdms-bodyDiv .layui-form::-webkit-scrollbar-track {
            /*-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);*/
            border-radius: 0;
            background: #f5f5f5;

        }
    </style>
</head>
<body class="listBody">
    <div class="qbdms-bodyDiv" style="position: relative">
        <div style="background-color: #ffffff;height: 100%">
        <input type="text" name="id" autocomplete="off" class="layui-input " maxlength="50" fieldname="id" style="display: none">
        <div class="layui-table-view-body" style="padding: 0 24px 24px;">
            <div class="qbdms-formTitle" style="border-bottom: 1px solid #E5F0FF;font-size: 16px">知识管理详情 <i class="qbdms-returnOn closeWindow">返回</i></div>
            <div class="layui-form" >
                <div class="qbdms-formTitle"  title="${wQbdQualityKnow.knowledgeName}" >${wQbdQualityKnow.knowledgeName}  </div>
                    <button class="layui-btn layui-btn-sm layui-icon layui-icon-link qbdms-returnOn  " onclick="downFile()">下载文件</button>


                <div class="main-fun">
                    <div class="leftCon" style="margin-top: 12px">
                        <span class="classification">密级:${wQbdQualityKnow.secret}</span>
                        <span class="nameInfo">${wQbdQualityKnow.fillman}</span>
                        <span class="timeInfo">发布于:${wQbdQualityKnow.filldate}</span>
                        <span class="timeInfo">发布单位:${wQbdQualityKnow.filldept}</span>
                    </div>
                </div>
                <hr class="layui-bg-gray">
                    <p class="bigTit" style="margin-top: 0">摘要</p>
                    <p class="summaryDocument" style="text-indent: 2em">${wQbdQualityKnow.summaryDocument} </p>
                    <p class="bigTit">详情</p>
<!--                    <iframe id="pdf" style="width: 99%;height: 100%;border: none" src="">-->

<!--                    </iframe>-->

                               <iframe id="doc" style="width: 99%;height: 100%;border: none" src="">

                               </iframe>

        </div>
        </div>
        </div>
    </div>
<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>

    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'common', 'jquery',], function () {
        var $ = layui.jquery;
        var common = layui.common;
        var setter = layui.setter;
        // function xz(){
        //     console.log(fileId);
        //     // window.location.href =  setter.extendLinkPath + "attachFile/download?fileId=" + fileId;
        // }

        //关闭当前页面
        $(".closeWindow").click(function () {
            window.location.href = serverPath.qbdmsPath + '/qbdms/wQbdQualityKnow/view/list';
        });
        var loading;
        // loading=layer.load(1);
        var fileId="${wQbdQualityKnow.fileId}";
        var path="${path}";
        var fullfilename="${filename}"
        // var url="http://localhost:8080"+serverPath.qbdmsPath+"/"+path;
        var url=kkfile.local_url +serverPath.qbdmsPath + setter.extendLinkPath + "attachFile/download?fileId=" + fileId
        var previewUrl = url + '&fullfilename='+fullfilename
        $("#doc").attr("src",kkfile.kkfile_url+encodeURIComponent(previewUrl))

        // $("#doc").attr("src",'http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent("http://www.mizi.work/wp-content/uploads/2020/10/2020101309184699.xlsx"))


        // $.ajax({
        //     url: serverPath.qbdmsPath + "/qbdms/wQbdQualityKnow/showPDFFileLoad",
        //     type: "post",
        //     data: {fileId:fileId},
        //     dataType: 'json',
        //     success: function (data) {
        //         // urlencode编码 %3d
        //         // $("#pdf").attr("src","${ctx}/pdfjs/web/viewer.html?file=${ctx}/qbdms/wQbdQualityKnow/showPDFFile?fileId%3d"+fileId);
        //         window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(previewUrl));
        //         layer.close(loading);
        //     },
        //     error: function (XMLHttpRequest, textStatus, errorThrown) {
        //         alert(textStatus)
        //         // layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'});
        //         //执行重载
        //     }
        // })

        window.downFile =function() {
            window.location.href =  serverPath.qbdmsPath + setter.extendLinkPath + "attachFile/download?fileId=" + fileId;
        }
    });
</script>
</body>
</html>